import { request } from "@umijs/max";

///dev-api/ying/common/user-list
export async function userList() {
  return request("/api/ying/common/user-list", {
    method: "GET",
  });
}
// ​/dev-api​/ying​/project​/list
export async function projectList(params: any) {
  return request("/api/ying/project/list", {
    method: "GET",
    params,
  });
}
// /dev-api/ying/project/add
export async function projectAdd(data: any) {
  return request("/api/ying/project/add", {
    method: "POST",
    data,
  });
}
///dev-api/ying/project/delete/{id}
export async function projectDelete(id: number) {
  return request(`/api/ying/project/delete/${id}`, {
    method: "DELETE",
  });
}
// /dev-api/ying/project/edit
export async function projectEdit(data: any) {
  return request("/api/ying/project/edit", {
    method: "PUT",
    data,
  });
}
///dev-api/ying/project/detail/{id}
export async function projectDetail({ id }: { id: number }) {
  return request(`/api/ying/project/detail/${id}`, {
    method: "GET",
  });
}
